using DataDynamics.ActiveReports;
using DataDynamics.ActiveReports.Export.Xls;
using SM;
using SM.core;
using SS;
using SS.core;
using SS.dir;
using System;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Threading;
using System.Windows.Forms;
using TVSGPP.func;
namespace TVSBH.func
{
	public class frmBookWattingForProcess : Form
	{
		private Func objFunc = new Func();
		private DataTable objTable = new DataTable();
		private Bill objBill = new Bill();
		private frmWaitting objW;
		public string userName = "";
		public string fullName = "";
		private IContainer components = null;
		private Grid dgvProduct;
		private Button btnClose;
		private Button btnPrint;
		private System.Windows.Forms.Label lblWarning;
		private Button btnExportToExcel;
		private System.Windows.Forms.Label label4;
		private Button btnEdit;
		private Button btnUpdate;
		private Button btnAdd;
		private DataGridViewTextBoxColumn CreateDate;
		private DataGridViewTextBoxColumn productName;
		private DataGridViewTextBoxColumn productUnit;
		private DataGridViewTextBoxColumn Packet;
		private DataGridViewTextBoxColumn ProductExpiryDate;
		private DataGridViewTextBoxColumn Provider;
		private DataGridViewTextBoxColumn ProductNumber;
		private DataGridViewTextBoxColumn Reason;
		private DataGridViewTextBoxColumn Handling;
		private DataGridViewTextBoxColumn ID;
		public frmBookWattingForProcess()
		{
			this.InitializeComponent();
		}
		private void showWatting()
		{
			this.objW = new frmWaitting();
			this.objW.ShowDialog();
			Thread.Sleep(40);
		}
		private void frmInput_Load(object sender, EventArgs e)
		{
			ThreadStart start = new ThreadStart(this.showWatting);
			Thread thread = new Thread(start);
			thread.Start();
			if (!thread.Join(150))
			{
				this.dgvProduct.AutoGenerateColumns = false;
				this.getBook();
			}
			thread.Abort();
		}
		private void btnClose_Click(object sender, EventArgs e)
		{
			base.Close();
		}
		private void frmInput_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.F4)
			{
				this.btnAdd.PerformClick();
			}
			else
			{
				if (e.KeyCode == Keys.F5)
				{
					this.btnEdit.PerformClick();
				}
				else
				{
					if (e.KeyCode == Keys.F6)
					{
						this.btnUpdate.PerformClick();
					}
					else
					{
						if (e.KeyCode == Keys.F7)
						{
							this.btnPrint.PerformClick();
						}
						else
						{
							if (e.KeyCode == Keys.Escape)
							{
								base.Close();
							}
						}
					}
				}
			}
		}
		public void getBook()
		{
			products products = new products();
			try
			{
				DataTable dataTable = new DataTable();
				DataColumn column = new DataColumn("ID", typeof(int));
				DataColumn column2 = new DataColumn("CreateDate", typeof(DateTime));
				DataColumn column3 = new DataColumn("productName", typeof(string));
				DataColumn column4 = new DataColumn("productUnit", typeof(string));
				DataColumn column5 = new DataColumn("Packet", typeof(string));
				DataColumn column6 = new DataColumn("ProductExpiryDate", typeof(DateTime));
				DataColumn column7 = new DataColumn("Provider", typeof(string));
				DataColumn column8 = new DataColumn("ProductNumber", typeof(float));
				DataColumn column9 = new DataColumn("Reason", typeof(string));
				DataColumn column10 = new DataColumn("Handling", typeof(string));
				dataTable.Columns.Add(column);
				dataTable.Columns.Add(column2);
				dataTable.Columns.Add(column3);
				dataTable.Columns.Add(column4);
				dataTable.Columns.Add(column5);
				dataTable.Columns.Add(column6);
				dataTable.Columns.Add(column7);
				dataTable.Columns.Add(column8);
				dataTable.Columns.Add(column9);
				dataTable.Columns.Add(column10);
				SqlConnection sqlConnection = new SqlConnection(Program.strConnectionString);
				sqlConnection.Open();
				SqlCommand sqlCommand = sqlConnection.CreateCommand();
				sqlCommand.CommandText = "SELECT * FROM TabBookWattingForProcess ORDER BY [CreateDate] DESC";
				SqlDataReader sqlDataReader = sqlCommand.ExecuteReader();
				while (sqlDataReader.Read())
				{
					dataTable.Rows.Add(new object[]
					{
						sqlDataReader["ID"].ToString(),
						sqlDataReader["CreateDate"].ToString(),
						sqlDataReader["productName"].ToString(),
						sqlDataReader["productUnit"].ToString(),
						sqlDataReader["Packet"].ToString(),
						sqlDataReader["ProductExpiryDate"].ToString(),
						sqlDataReader["Provider"].ToString(),
						sqlDataReader["ProductNumber"].ToString(),
						sqlDataReader["Reason"].ToString(),
						sqlDataReader["Handling"].ToString()
					});
				}
				sqlDataReader.Close();
				sqlConnection.Close();
				sqlConnection.Dispose();
				this.btnPrint.Enabled = true;
				this.objTable = dataTable;
				this.dgvProduct.AutoGenerateColumns = false;
				this.dgvProduct.DataSource = this.objTable;
				if (this.objTable.Rows.Count > 0)
				{
					this.btnPrint.Enabled = true;
					this.btnExportToExcel.Enabled = true;
				}
				else
				{
					this.btnPrint.Enabled = false;
					this.btnExportToExcel.Enabled = false;
				}
			}
			catch
			{
				this.btnPrint.Enabled = false;
				this.btnExportToExcel.Enabled = false;
				this.objTable = null;
				this.dgvProduct.DataSource = this.objTable;
			}
		}
		private bool checkProductNameInDataGridView(string pName, string Packet, DataTable objTable)
		{
			bool result = false;
			for (int i = 0; i < objTable.Rows.Count; i++)
			{
				if (objTable.Rows[i]["ProductName"].ToString().ToUpper() == pName.ToUpper() && objTable.Rows[i]["Packet"].ToString().ToUpper() == Packet.ToUpper())
				{
					result = true;
				}
			}
			return result;
		}
		private bool checkProductNameInDataGridView(string pName, DataTable objTable)
		{
			bool result = false;
			for (int i = 0; i < objTable.Rows.Count; i++)
			{
				if (objTable.Rows[i]["ProductName"].ToString().ToUpper() == pName.ToUpper())
				{
					result = true;
				}
			}
			return result;
		}
		private void btnSearch_Click(object sender, EventArgs e)
		{
			this.getBook();
		}
		private void resetDataGridView()
		{
			this.objTable = null;
			this.dgvProduct.DataSource = this.objTable;
			this.btnPrint.Enabled = false;
		}
		private void btnPrint_Click(object sender, EventArgs e)
		{
			frmBookSellNotBillView frmBookSellNotBillView = new frmBookSellNotBillView();
			frmBookSellNotBillView.objectName = "BookWattingForProcess";
			frmBookWattingForProcessPrint.objTable = this.objTable;
			frmBookSellNotBillView.ShowDialog();
		}
		private void btnExportToExcel_Click(object sender, EventArgs e)
		{
			try
			{
				frmBookWattingForProcessPrint.objTable = new DataTable();
				frmBookWattingForProcessPrint.objTable = this.objTable;
				ActiveReport3 activeReport = new frmBookWattingForProcessPrint();
				activeReport.Run();
				XlsExport xlsExport = new XlsExport();
				SaveFileDialog saveFileDialog = new SaveFileDialog();
				saveFileDialog.ShowDialog();
				string text = saveFileDialog.FileName;
				if (text != "")
				{
					if (!text.ToUpper().Contains(".XLS"))
					{
						text += ".xls";
					}
					xlsExport.Export(activeReport.Document, text);
					MessageBox.Show("Hệ thống đã hoàn thành việc xuất dữ liệu ra file Excel", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				}
				else
				{
					MessageBox.Show("Bạn chưa chọn đường dẫn và tên file cần xuất!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
				}
			}
			catch
			{
			}
		}
		private void btnEdit_Click(object sender, EventArgs e)
		{
			this.dgvProduct.ReadOnly = false;
			this.btnUpdate.Enabled = true;
			this.dgvProduct.SelectionMode = DataGridViewSelectionMode.CellSelect;
		}
		private void btnUpdate_Click(object sender, EventArgs e)
		{
			this.saveInfo();
			this.dgvProduct.ReadOnly = true;
			this.btnUpdate.Enabled = false;
			this.dgvProduct.AllowUserToAddRows = false;
			this.dgvProduct.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
		}
		private void saveInfo()
		{
			try
			{
				SqlConnection sqlConnection = new SqlConnection(Program.strConnectionString);
				sqlConnection.Open();
				SqlCommand sqlCommand = new SqlCommand("sp_TabBookWattingForProcess", sqlConnection);
				sqlCommand.CommandType = CommandType.StoredProcedure;
				sqlCommand.Parameters.Add("ID", SqlDbType.Int);
				sqlCommand.Parameters.Add("CreateDate", SqlDbType.DateTime);
				sqlCommand.Parameters.Add("productName", SqlDbType.NVarChar, 250);
				sqlCommand.Parameters.Add("productUnit", SqlDbType.NVarChar, 200);
				sqlCommand.Parameters.Add("Packet", SqlDbType.NVarChar, 200);
				sqlCommand.Parameters.Add("ProductExpiryDate", SqlDbType.DateTime);
				sqlCommand.Parameters.Add("Provider", SqlDbType.NVarChar, 200);
				sqlCommand.Parameters.Add("ProductNumber", SqlDbType.Float);
				sqlCommand.Parameters.Add("Reason", SqlDbType.NVarChar, 500);
				sqlCommand.Parameters.Add("Handling", SqlDbType.NVarChar, 300);
				for (int i = 0; i < this.dgvProduct.RowCount; i++)
				{
					if (this.dgvProduct.Rows[i].Cells["ID"].Value.ToString() != "")
					{
						sqlCommand.Parameters["ID"].Value = this.dgvProduct.Rows[i].Cells["ID"].Value.ToString();
					}
					else
					{
						sqlCommand.Parameters["ID"].Value = "0";
					}
					sqlCommand.Parameters["CreateDate"].Value = this.dgvProduct.Rows[i].Cells["CreateDate"].Value.ToString();
					sqlCommand.Parameters["productName"].Value = this.dgvProduct.Rows[i].Cells["productName"].Value.ToString();
					sqlCommand.Parameters["productUnit"].Value = this.dgvProduct.Rows[i].Cells["productUnit"].Value.ToString();
					sqlCommand.Parameters["Packet"].Value = this.dgvProduct.Rows[i].Cells["Packet"].Value.ToString();
					sqlCommand.Parameters["ProductExpiryDate"].Value = this.dgvProduct.Rows[i].Cells["ProductExpiryDate"].Value.ToString();
					sqlCommand.Parameters["Provider"].Value = this.dgvProduct.Rows[i].Cells["Provider"].Value.ToString();
					sqlCommand.Parameters["ProductNumber"].Value = this.dgvProduct.Rows[i].Cells["ProductNumber"].Value.ToString();
					sqlCommand.Parameters["Reason"].Value = this.dgvProduct.Rows[i].Cells["Reason"].Value.ToString();
					sqlCommand.Parameters["Handling"].Value = this.dgvProduct.Rows[i].Cells["Handling"].Value.ToString();
					sqlCommand.ExecuteNonQuery();
				}
				sqlConnection.Close();
				sqlConnection.Dispose();
				MessageBox.Show("Thông tin đã được lưu vào cở sở dữ liệu !", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
			}
			catch
			{
			}
		}
		private void dgvProduct_CellEnter(object sender, DataGridViewCellEventArgs e)
		{
		}
		private void btnAdd_Click(object sender, EventArgs e)
		{
			this.dgvProduct.AllowUserToAddRows = true;
			this.dgvProduct.ReadOnly = false;
			this.btnUpdate.Enabled = true;
			this.dgvProduct.SelectionMode = DataGridViewSelectionMode.CellSelect;
		}
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
			DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle3 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle4 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle5 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle6 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle7 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle8 = new DataGridViewCellStyle();
			ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(frmBookWattingForProcess));
			this.dgvProduct = new Grid();
			this.CreateDate = new DataGridViewTextBoxColumn();
			this.productName = new DataGridViewTextBoxColumn();
			this.productUnit = new DataGridViewTextBoxColumn();
			this.Packet = new DataGridViewTextBoxColumn();
			this.ProductExpiryDate = new DataGridViewTextBoxColumn();
			this.Provider = new DataGridViewTextBoxColumn();
			this.ProductNumber = new DataGridViewTextBoxColumn();
			this.Reason = new DataGridViewTextBoxColumn();
			this.Handling = new DataGridViewTextBoxColumn();
			this.ID = new DataGridViewTextBoxColumn();
			this.btnClose = new Button();
			this.btnPrint = new Button();
			this.lblWarning = new System.Windows.Forms.Label();
			this.btnExportToExcel = new Button();
			this.label4 = new System.Windows.Forms.Label();
			this.btnEdit = new Button();
			this.btnUpdate = new Button();
			this.btnAdd = new Button();
			((ISupportInitialize)this.dgvProduct).BeginInit();
			base.SuspendLayout();
			this.dgvProduct.AllowUserToAddRows = false;
			this.dgvProduct.AllowUserToDeleteRows = false;
			this.dgvProduct.AllowUserToOrderColumns = true;
			this.dgvProduct.AllowUserToResizeColumns = false;
			this.dgvProduct.AllowUserToResizeRows = false;
			dataGridViewCellStyle.BackColor = Color.FromArgb(192, 255, 255);
			dataGridViewCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle;
			this.dgvProduct.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.dgvProduct.BackgroundColor = Color.White;
			this.dgvProduct.BorderStyle = BorderStyle.Fixed3D;
			dataGridViewCellStyle2.Alignment = DataGridViewContentAlignment.MiddleCenter;
			dataGridViewCellStyle2.BackColor = SystemColors.Control;
			dataGridViewCellStyle2.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
			dataGridViewCellStyle2.ForeColor = SystemColors.WindowText;
			dataGridViewCellStyle2.SelectionBackColor = SystemColors.Highlight;
			dataGridViewCellStyle2.SelectionForeColor = SystemColors.HighlightText;
			this.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
			this.dgvProduct.ColumnHeadersHeight = 30;
			this.dgvProduct.Columns.AddRange(new DataGridViewColumn[]
			{
				this.CreateDate,
				this.productName,
				this.productUnit,
				this.Packet,
				this.ProductExpiryDate,
				this.Provider,
				this.ProductNumber,
				this.Reason,
				this.Handling,
				this.ID
			});
			this.dgvProduct.Cursor = Cursors.Hand;
			this.dgvProduct.EnableHeadersVisualStyles = false;
			this.dgvProduct.Location = new System.Drawing.Point(5, 33);
			this.dgvProduct.MultiSelect = false;
			this.dgvProduct.Name = "dgvProduct";
			this.dgvProduct.ReadOnly = true;
			dataGridViewCellStyle3.Alignment = DataGridViewContentAlignment.MiddleLeft;
			dataGridViewCellStyle3.BackColor = SystemColors.Control;
			dataGridViewCellStyle3.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
			dataGridViewCellStyle3.ForeColor = SystemColors.WindowText;
			dataGridViewCellStyle3.SelectionBackColor = SystemColors.Highlight;
			dataGridViewCellStyle3.SelectionForeColor = SystemColors.HighlightText;
			this.dgvProduct.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
			this.dgvProduct.RowHeadersVisible = false;
			this.dgvProduct.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
			dataGridViewCellStyle4.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvProduct.RowsDefaultCellStyle = dataGridViewCellStyle4;
			this.dgvProduct.RowTemplate.DefaultCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvProduct.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
			this.dgvProduct.Size = new Size(888, 530);
			this.dgvProduct.TabIndex = 0;
			this.dgvProduct.CellEnter += new DataGridViewCellEventHandler(this.dgvProduct_CellEnter);
			this.CreateDate.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.CreateDate.DataPropertyName = "CreateDate";
			dataGridViewCellStyle5.Format = "dd/MM/yyyy";
			this.CreateDate.DefaultCellStyle = dataGridViewCellStyle5;
			this.CreateDate.HeaderText = "Ngày nhập";
			this.CreateDate.MinimumWidth = 80;
			this.CreateDate.Name = "CreateDate";
			this.CreateDate.ReadOnly = true;
			this.CreateDate.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.CreateDate.Width = 80;
			this.productName.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
			this.productName.DataPropertyName = "productName";
			dataGridViewCellStyle6.Alignment = DataGridViewContentAlignment.MiddleLeft;
			dataGridViewCellStyle6.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
			dataGridViewCellStyle6.ForeColor = Color.Black;
			this.productName.DefaultCellStyle = dataGridViewCellStyle6;
			this.productName.HeaderText = "Tên thuốc, nồng độ, hàm lượng";
			this.productName.MinimumWidth = 170;
			this.productName.Name = "productName";
			this.productName.ReadOnly = true;
			this.productName.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.productUnit.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.productUnit.DataPropertyName = "productUnit";
			this.productUnit.HeaderText = "Đơn vị tính / Dạng bào chế";
			this.productUnit.MinimumWidth = 110;
			this.productUnit.Name = "productUnit";
			this.productUnit.ReadOnly = true;
			this.productUnit.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.productUnit.Width = 110;
			this.Packet.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Packet.DataPropertyName = "Packet";
			this.Packet.HeaderText = "Số lô";
			this.Packet.MinimumWidth = 120;
			this.Packet.Name = "Packet";
			this.Packet.ReadOnly = true;
			this.Packet.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Packet.Width = 120;
			this.ProductExpiryDate.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.ProductExpiryDate.DataPropertyName = "ProductExpiryDate";
			dataGridViewCellStyle7.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			dataGridViewCellStyle7.ForeColor = Color.Red;
			dataGridViewCellStyle7.Format = "dd/MM/yyyy";
			this.ProductExpiryDate.DefaultCellStyle = dataGridViewCellStyle7;
			this.ProductExpiryDate.HeaderText = "Hạn sử dụng";
			this.ProductExpiryDate.MinimumWidth = 90;
			this.ProductExpiryDate.Name = "ProductExpiryDate";
			this.ProductExpiryDate.ReadOnly = true;
			this.ProductExpiryDate.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.ProductExpiryDate.Width = 90;
			this.Provider.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Provider.DataPropertyName = "Provider";
			this.Provider.HeaderText = "Hãng phân phối / Nước sản xuất";
			this.Provider.MinimumWidth = 170;
			this.Provider.Name = "Provider";
			this.Provider.ReadOnly = true;
			this.Provider.Width = 170;
			this.ProductNumber.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.ProductNumber.DataPropertyName = "ProductNumber";
			dataGridViewCellStyle8.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle8.Format = "N0";
			dataGridViewCellStyle8.NullValue = "0";
			this.ProductNumber.DefaultCellStyle = dataGridViewCellStyle8;
			this.ProductNumber.HeaderText = "Số lượng";
			this.ProductNumber.MinimumWidth = 75;
			this.ProductNumber.Name = "ProductNumber";
			this.ProductNumber.ReadOnly = true;
			this.ProductNumber.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.ProductNumber.Width = 75;
			this.Reason.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Reason.DataPropertyName = "Reason";
			this.Reason.HeaderText = "Lý do";
			this.Reason.MinimumWidth = 150;
			this.Reason.Name = "Reason";
			this.Reason.ReadOnly = true;
			this.Reason.Width = 150;
			this.Handling.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Handling.DataPropertyName = "Handling";
			this.Handling.HeaderText = "Hướng xử lý";
			this.Handling.MinimumWidth = 170;
			this.Handling.Name = "Handling";
			this.Handling.ReadOnly = true;
			this.Handling.Width = 170;
			this.ID.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.ID.DataPropertyName = "ID";
			this.ID.HeaderText = "ID";
			this.ID.Name = "ID";
			this.ID.ReadOnly = true;
			this.ID.Visible = false;
			this.btnClose.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.btnClose.Cursor = Cursors.Hand;
			this.btnClose.FlatAppearance.BorderColor = Color.FromArgb(255, 128, 255);
			this.btnClose.FlatStyle = FlatStyle.Flat;
			this.btnClose.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnClose.Location = new System.Drawing.Point(795, 569);
			this.btnClose.Name = "btnClose";
			this.btnClose.Size = new Size(98, 26);
			this.btnClose.TabIndex = 6;
			this.btnClose.Text = "Thoát  [ ESC ]";
			this.btnClose.UseVisualStyleBackColor = true;
			this.btnClose.Click += new EventHandler(this.btnClose_Click);
			this.btnPrint.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnPrint.Cursor = Cursors.Hand;
			this.btnPrint.Enabled = false;
			this.btnPrint.FlatAppearance.BorderColor = Color.FromArgb(255, 128, 255);
			this.btnPrint.FlatStyle = FlatStyle.Flat;
			this.btnPrint.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnPrint.Location = new System.Drawing.Point(321, 569);
			this.btnPrint.Name = "btnPrint";
			this.btnPrint.Size = new Size(102, 26);
			this.btnPrint.TabIndex = 4;
			this.btnPrint.Text = "Xem và in [ F7 ]";
			this.btnPrint.UseVisualStyleBackColor = true;
			this.btnPrint.Click += new EventHandler(this.btnPrint_Click);
			this.lblWarning.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.lblWarning.BackColor = Color.White;
			this.lblWarning.BorderStyle = BorderStyle.Fixed3D;
			this.lblWarning.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.lblWarning.ForeColor = Color.Red;
			this.lblWarning.Location = new System.Drawing.Point(246, 7);
			this.lblWarning.Name = "lblWarning";
			this.lblWarning.Size = new Size(357, 20);
			this.lblWarning.TabIndex = 42;
			this.lblWarning.Text = "---";
			this.lblWarning.TextAlign = ContentAlignment.MiddleLeft;
			this.lblWarning.Visible = false;
			this.btnExportToExcel.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnExportToExcel.Enabled = false;
			this.btnExportToExcel.FlatAppearance.BorderColor = Color.FromArgb(255, 128, 255);
			this.btnExportToExcel.FlatStyle = FlatStyle.Flat;
			this.btnExportToExcel.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnExportToExcel.Location = new System.Drawing.Point(425, 569);
			this.btnExportToExcel.Name = "btnExportToExcel";
			this.btnExportToExcel.Size = new Size(78, 26);
			this.btnExportToExcel.TabIndex = 5;
			this.btnExportToExcel.Text = "Xuất Excel";
			this.btnExportToExcel.UseVisualStyleBackColor = true;
			this.btnExportToExcel.Click += new EventHandler(this.btnExportToExcel_Click);
			this.label4.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.label4.BackColor = SystemColors.ControlLight;
			this.label4.Font = new Font("Arial", 12f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label4.Location = new System.Drawing.Point(5, 6);
			this.label4.Name = "label4";
			this.label4.Size = new Size(888, 27);
			this.label4.TabIndex = 48;
			this.label4.Text = "SỔ THEO DÕI HÀNG CHỜ XỬ LÝ";
			this.label4.TextAlign = ContentAlignment.MiddleCenter;
			this.btnEdit.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnEdit.Cursor = Cursors.Hand;
			this.btnEdit.FlatAppearance.BorderColor = Color.FromArgb(255, 128, 255);
			this.btnEdit.FlatStyle = FlatStyle.Flat;
			this.btnEdit.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnEdit.Location = new System.Drawing.Point(113, 569);
			this.btnEdit.Name = "btnEdit";
			this.btnEdit.Size = new Size(102, 26);
			this.btnEdit.TabIndex = 2;
			this.btnEdit.Text = "Cập nhật [ F5 ]";
			this.btnEdit.UseVisualStyleBackColor = true;
			this.btnEdit.Click += new EventHandler(this.btnEdit_Click);
			this.btnUpdate.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnUpdate.Cursor = Cursors.Hand;
			this.btnUpdate.Enabled = false;
			this.btnUpdate.FlatAppearance.BorderColor = Color.FromArgb(255, 128, 255);
			this.btnUpdate.FlatStyle = FlatStyle.Flat;
			this.btnUpdate.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnUpdate.Location = new System.Drawing.Point(217, 569);
			this.btnUpdate.Name = "btnUpdate";
			this.btnUpdate.Size = new Size(102, 26);
			this.btnUpdate.TabIndex = 3;
			this.btnUpdate.Text = "Ghi nhận [ F6 ]";
			this.btnUpdate.UseVisualStyleBackColor = true;
			this.btnUpdate.Click += new EventHandler(this.btnUpdate_Click);
			this.btnAdd.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnAdd.Cursor = Cursors.Hand;
			this.btnAdd.FlatAppearance.BorderColor = Color.FromArgb(255, 128, 255);
			this.btnAdd.FlatStyle = FlatStyle.Flat;
			this.btnAdd.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnAdd.Location = new System.Drawing.Point(5, 569);
			this.btnAdd.Name = "btnAdd";
			this.btnAdd.Size = new Size(106, 26);
			this.btnAdd.TabIndex = 1;
			this.btnAdd.Text = "Thêm mới [ F4 ]";
			this.btnAdd.UseVisualStyleBackColor = true;
			this.btnAdd.Click += new EventHandler(this.btnAdd_Click);
			base.AutoScaleDimensions = new SizeF(7f, 15f);
			//base.AutoScaleMode = AutoScaleMode.Font;
			this.BackColor = Color.White;
			base.ClientSize = new Size(900, 600);
			base.Controls.Add(this.btnAdd);
			base.Controls.Add(this.btnUpdate);
			base.Controls.Add(this.btnEdit);
			base.Controls.Add(this.btnExportToExcel);
			base.Controls.Add(this.label4);
			base.Controls.Add(this.btnPrint);
			base.Controls.Add(this.lblWarning);
			base.Controls.Add(this.btnClose);
			base.Controls.Add(this.dgvProduct);
			this.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
			//base.Icon = (System.Drawing.Icon)componentResourceManager.GetObject("$this.Icon");
			//base.Icon = (Icon)componentResourceManager.GetObject("$this.Icon");
			base.KeyPreview = true;
			base.Name = "frmBookWattingForProcess";
			base.ShowInTaskbar = false;
			base.StartPosition = FormStartPosition.CenterScreen;
			this.Text = "SẢN PHẨM SẮP HẾT HẠN SỬ DỤNG";
			base.WindowState = FormWindowState.Maximized;
			base.Load += new EventHandler(this.frmInput_Load);
			base.KeyDown += new KeyEventHandler(this.frmInput_KeyDown);
			((ISupportInitialize)this.dgvProduct).EndInit();
			base.ResumeLayout(false);
		}
	}
}
